package com.firewolf.oa.dao.impl;

import org.springframework.stereotype.Repository;

import com.firewolf.oa.base.impl.BaseDaoImpl;
import com.firewolf.oa.dao.UserDao;
import com.firewolf.oa.entities.User;

@Repository
public class UserDaoImpl extends BaseDaoImpl<User> implements UserDao {

	@Override
	public User findUserByNameAndPwd(String name, String password) {
		return (User) getSession().createQuery("FROM User WHERE loginName=:name and password=:pwd ").setParameter("name", name)
				.setParameter("pwd", password).uniqueResult();
	}

}
